Carbon


MPArmTimer

Header: Multiprocessing.h Carbon status: Supported

Arms the timer to expire at a given time.

OSStatus MPArmTimer (
    MPTimerID timerID, 
    AbsoluteTime *expirationTime, 
    OptionBits options
);
timerID

The ID of the timer you want to arm.

expirationTime

A pointer to a value that specifies when you want the timer to expire. Note that if you arm the timer with a time that has already passed, the timer expires immediately.

options

Any optional actions. See “Timer Option Masks” for a list of possible values.

function result

A result code. If the timer has already expired, the reset does not take place and the function returns kMPInsufficientResourcesErr.

DISCUSSION

The expiration time is an absolute time, which you can generate by calling the UpTime function. When the timer expires, a notification is sent to the notification mechanism specified in the last MPSetTimerNotify call. If the specified notification ID has become invalid, no action is taken when the timer expires. The timer itself is deleted when it expires unless you specified the kMPPreserveTimerID option in the options parameter.

Also see the function MPCancelTimer.

VERSION NOTES

Introduced with Multiprocessing Services 2.0.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when MPLibrary 2.0 or later is installed. Exported by CarbonLib 1.0 and later and by MPLibrary 2.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/6/2000)